
<!DOCTYPE HTML PUBLIC "-//W3C//DTD -//W3C//DTD HTML 4.01//EN//EN" "">
<%@ page contentType="text/html; charset=utf-8" %>
<%@page import="controller.Controller"%>
<%@ page import="java.util.*,dataBase.*"%>
<%@page import="com.google.appengine.api.datastore.Key"%>
<%@page import="comparator.sortByStatus"%>
<%@page import="comparator.sortByDate"%>
<%@page import="sessionMenegment.SessionMgr"%>
<%@page import="com.google.appengine.api.datastore.Text"%>
<%@page import="language.LangFactory"%>
<%@page import="language.LangIntrf"%>
<%@ page import="com.google.appengine.api.users.UserService"%>
<%@ page import="com.google.appengine.api.users.UserServiceFactory"%>
<%
	SessionMgr sessionMgr = SessionMgr.getInst();
	boolean user = sessionMgr.checkUser(request,session);
	if(!user)
		response.sendRedirect("home.jsp");
%>
<%
	LangFactory langFactory= new LangFactory();
	String langName = request.getParameter("lang");
	LangIntrf lang =null;
	if(langName!=null){
		lang = langFactory.getLang(request.getParameter("lang"));
		session.setAttribute("lang",langName);
	}
	else
		lang = langFactory.getLang((String)session.getAttribute("lang"));
	String langSign = lang.getLang();
	
	
%>

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js"></script>

<html>

	<head>
		<link rel="icon" href="images/synca.png" type="image/x-icon"/> 
		<link rel="shortcut icon" href="images/synca.png" type="image/x-icon"/>
		<link href="styleClient.css" rel="stylesheet" type="text/css" />
		<link href="e.css" rel="stylesheet" type="text/css" />
        <link href="rating/jquery.rating.css" rel="stylesheet" type="text/css" />
        
        <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
        <script type="text/javascript" src="jquery.tools.min.js"></script>
		<script type="text/javascript" src="jquery-ui-1.7.1.custom.min.js"></script>
        <script type="text/javascript" src="jquery.address-1.4.min.js"></script>
        <script type="text/javascript" src="rating/jquery.MetaData.js"></script>
		<script type="text/javascript" src="rating/jquery.rating.js"></script>

		<title>Synca</title>
        <script>
			jQuery(document).ready(
				function() {
					
					$("#messageBox").hide();
					$("#logOut").click(function(){
							$.post("logOutClient",function(){$(location).attr('href','home.jsp');});
					});
					$("#profile").click(function(){
						$.post("myProfileClient",function(){$(location).attr('href','myProfileClient2.jsp');});
				    });
					$("#closeBox").click(function(){
							$(this).parent().slideUp(500);
					});
					$("#newOrder").click(function(){
							$("#messageBox").slideToggle(500);
					});
					$("#newOrderButton").click(function(){
							$("#messageBox").slideToggle(500);
					});
					// Example 1.2: Sortable and connectable lists
					$('#example-1-2 .sortable-list').sortable({
						connectWith: '#example-1-2 .sortable-list'
					});

					  $(".content").hide();
					  $(".arrow").click(function()
					  {
						  changeDivContent("statusDiv",$(this).parent());
					  });
					  $(".message").click(function()
					  {
						  changeDivContent("messageDiv",$(this).parent());
						  $(this).attr('src','message4.png');
						  $.post("messageToReadBusiness",{orderID : $(this).parent().find("#orderId").val(),messageToRead : 'false',userNameBusiness:  $(this).parent().find("#bizUser").val() },function(){});
						  ;
					  });
					  $(".cogWheel").click(function()
					  {
						  changeDivContent("settingDiv",$(this).parent());				
					  });
					  
					  $(".exit").click(function(){
						  	$(this).parent().hide(500);
					  });
					  $('.star').click(function(){
							 var voteUser = $(this).parent().parent().parent().find("input:radio:checked").val();
							 var bizName = $(this).parent().parent().parent().find("#bizUser").val();
							 var orderNum = $(this).parent().parent().parent().find("#orderId").val();
							 $.get("addVoteClient",{orderNum : orderNum,biz : bizName,vote: voteUser},function(){});
					  });
					  changeDivContent = function(divName,elem){
						//  confirm(divName);
							if(divName=='settingDiv'){
								openDiv('settingDiv',elem)
						//		confirm("if");
					  		}
							else{
								
								closeDiv('settingDiv',elem);
							//	confirm("else");
							}
						//	confirm("xfx");
					  		(divName=='messageDiv') ? openDiv('messageDiv',elem) : closeDiv('messageDiv',elem);
					  		
							(divName=='statusDiv') ? openDiv('statusDiv',elem) : closeDiv('statusDiv',elem);
					  }
					  
					  openDiv = function(divName1,elem){
						  
						  elem.find('#'+divName1).attr('class','content');
						//  confirm("1");
						  //if(elem.find('#'+divName1).is(':not(:visiable)')){  
						//	  confirm("3");
							  elem.find('#'+divName1).slideToggle(500);	  
					//	  }
						//  confirm("2");
						  return true;
					  }
					  
					  closeDiv = function(divName,elem){
						  elem.find('#'+divName).attr('class','hiddenMain');
					//	  if(elem.find('#'+divName).is(':visiable')){
							  elem.find('#'+divName).hide(500);	  
					//	  }
						  return true;
					  }
					  
					
				}
				
			);

	
				


			
			

		</script>
        
	</head>

	<body>
	<%
	String clientUserName =(String)session.getAttribute("userNameClient");
	
	if (clientUserName==null){
		response.sendRedirect("home.jsp");
	}
	Client client = ConnectToDataBase.getInst().getClient(clientUserName);
	List<Order> list = Controller.getInstance().getClientOrders(clientUserName);
	
	String sortBy = request.getParameter("sort");
	//sortBy = "date";
	
	
	Comparator<Order> comparByDate = SortByDate.getInstance()
	.getDateComparator();
	//get the status comparator
	
	Comparator<Order> finalComparator=null;
	if (sortBy==null)
		finalComparator = null;
	else if (sortBy.equals("date"))
		finalComparator = comparByDate;
	//default
		
	//if the field is valid
	if (finalComparator != null) {
		Collections.sort(list, finalComparator);
	}
	
	ArrayList<Order> list1 = new ArrayList<Order>();
	ArrayList<Order> list2 = new ArrayList<Order>();
	ArrayList<Order> list3 = new ArrayList<Order>();

	int listSize = list.size();
	int numOfRound = listSize / 3;
	int mod = listSize % 3;
	int location = 0;
	for (int j = 0; j < numOfRound; j++) {
		list1.add(list.get(location));
		location++;
		list2.add(list.get(location));
		location++;
		list3.add(list.get(location));
		location++;
	}
	if (mod == 1) {
		list1.add(list.get(location));
	} else if (mod == 2) {
		list1.add(list.get(location));
		location++;
		list2.add(list.get(location));
	}
	
	AllBiz allBiz = AllBiz.getInst();
	System.out.println("!!!!!! "+session.getAttribute("validErrorClientNewOrder"));
	%>
	<%if(session.getAttribute("validErrorClientNewOrder")!=null){%>
		<div id="errorBox" class="messageBox" style="text-align: center;font-size:130%;">
    		<img src="closed12.png" id="closeBox" class="closeBox"/>
    		<table>
	    		<tr align="<%=lang.getAlign()%>">
	    			<td><img src="images/error.png" class="error"></td>
	    			<td><%=session.getAttribute("validErrorClientNewOrder")%></td>
	    		</tr>
    		</table>
    		
    		<br/>
    		
    	</div>
    	<%session.setAttribute("validErrorClientNewOrder",null);%>
	<%}%>
    <div id="messageBox">
    	<img src="closed12.png" id="closeBox"/>
    	<center>
    	<form id="newOrderClient" action="newOrderClient" method="POST" accept-charset="ISO-8859-1">
    	<table dir="<%=lang.getDirection()%>">
    		<tr>
    			<td><%=lang.getCOMPANY_NAME_LABEL()%></td>
    			<td>
    				<select name="businessName">
                    <%Controller controller = Controller.getInstance();
                      ArrayList<String> bizNameList = controller.allBizNameArray();
                      ArrayList<String> bizUserList = controller.allBizUserNameArray();
                      if(bizNameList==null || bizUserList==null){
                    	  System.out.println("error!!!!!!!!!!");
                    	  System.out.println(bizNameList);
                    	  System.out.println(bizUserList);

                      }
                      for(int i=0;i<bizNameList.size();i++){
                    %>
                        <option value="<%=bizUserList.get(i)%>"><%=bizNameList.get(i)%></option>
                    <%} %>
                    </select>
    			</td>
    		</tr>
    		<tr>
    			<td><%=lang.getORDER_NUBER_LABEL()%></td>
    			<td><input type="text" name="orderID" /></td>
    		</tr>
    		<tr>
    			<td><%=lang.getPHONE_NUMBER_LABEL()%></td>
    			<td><input type="text" name="phone" /></td>
    		</tr>
    		<tr>
    			<td align="right"><input type="checkbox" name="statusNotifications" /></td>
    			<td><%=lang.getNOTIFY_STATUSES_LABEL() %></td>
    		</tr>
    		<tr>
    			<td align="right"><input type="checkbox" name="messageNotifications" /></td>
    			<td><%=lang.getNOTIFY_MESSAGES_LABEL() %></td>
    		</tr>
    	</table>
			
            <button type="submit" value="Submit"><%=lang.getADD_ORDER_BUTTON()%></button>
            
        </form> 
        </center>
    </div>
<div id="container">
		
		<div id="headerLogedIn">
        <div id="logo">
        	Synca
        </div>
        <div class="menu_nav_logedIn">
            <ul id="menu">
                <li id="profile"><%=lang.getMY_PROFILE_LABEL()%></li>
                <%if(session.getAttribute("googleUser").equals("yes")){
                	UserService userService = UserServiceFactory.getUserService();                
                %>               
                	<li><a style="display: block;" href="<%=userService.createLogoutURL(controller.getSyncaWebAddress()+"/logOutClient")%>"><%=lang.getLOG_OUT_BUTTON()%></a></li>
                <%}else{ %>
                	<li id="logOut"><%=lang.getLOG_OUT_BUTTON()%></li>
                <%} %>
            </ul>
        </div>	
        	
		</div>

		<div id="left_sidebar">
            <div class="side_buttons">
        	<ul>
            	<li id="newOrderButton"><%=lang.getNEW_ORDER_BUTTON()%></li>
                <a href="allClientOrders.jsp"><li><%=lang.getALL_ORDERS_BUTTON()%></li></a>
            </ul>
            <%Ad ad = controller.getRandomAdByClient(clientUserName);
              if(ad!=null){%>
            	<a href="/adClicked?AdKey=<%= ad.getKey().getId() %>" target="1"><img src="/showAdClient?id=<%= ad.getKey().getId() %>"  /></a>
            	
            <%} %>
        </div>
		</div>
			<div class="control_bar">
            <%=lang.getSORT_BY_LABEL()%> <select name="select" onchange="location=this.options[this.selectedIndex].value">
            			<option value=" "> </option>  
                        <option value="allClientOrders.jsp?sort=date"><%=lang.getSORT_BY_DATE_LABEL()%></option>    
                     </select >  
            <div class="list">
            	<img src="list2.png"/>
            </div>
            <div class="list">
            	<img src="squares2.png"/>
            </div>
            <div class="list" id="newOrder">
            	<img src="add2.png"/>
            </div>
            <!--<img src="list.png" class="list"/>
            <img src="Squares.png" class="squares"/>
            <img src="add.png" class="add"/>-->
        </div>	
<div id="main_content">
	<div id="example-1-2">
	<div class="column left first">
	<ul class="sortable-list">
	<%
		for (Order i : list1) {
	%>
	
		<li class="sortable-item">
			<div class = "wraper">
				<img src="exit3.png"  class="exit"/>
				<p class="heading">
				<%Business biz = Controller.getInstance().getBiz(i.getBusinessUserName());%>
				<a href="/businessPage.jsp?bizKey=<%=biz.getKey().getId()%>" target="#">
				<% if (i.getBusinessUserName()!=null && biz.getLogoPic()!=null) {%>
					<img src="/showImage?imageKey=<%=i.getBusinessUserName() %>" width="50" />
				<%} else { %>
					<%=allBiz.userNameToBizName(i.getBusinessUserName())%>
				<%} %>
				</a>
				</p>
				<p class="heading"><%=lang.getORDER_LABEL()%> <%=i.getOrderNum()%></p>
				<input type="hidden" value="<%=i.getOrderNum()%>" id = "orderId"/>
				<input type="hidden" value="<%=i.getBusinessUserName()%>" id = "bizUser"/>
				<label class="heading2"><%=lang.getSTATUS_LABEL()%> <%=(Controller.getInstance().getCurrentStatusOfOrder(i)) %></label>
				<img src="arrowright3.png"  class="arrow"/><br>
				<%if(i.getMessageToRead()){ %>
					<img src="unread3.png" class="message" />
				<%}else{ %>
                     <img src="message4.png" class="message" />
                <%} %>
                     <img src="cogWheel4.png" class="cogWheel" />
                     <img src="trash4.png" class="trash"/>		
                     <div id="settingDiv" class="content">
                     <%
                     	
	    				int vote = i.getVote();
                     	for(int j=1;j<6;j++){
                     		if(j==1){
                     			if(vote==1){
                     				%><input class="star required" type="radio" name="vote1" value="1" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star required" type="radio" name="vote1" value="1"/><%
                     			}
                     		}
                     		else{
                     			if(vote==j){
                     				%><input class="star" type="radio" name="vote1" value="<%=j %>" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star" type="radio" name="vote1" value="<%=j %>"/><%
                     			}
                     		}                   		
                     	}%><br/><br/>
					<form action="orderSettingClient" method="post" style="font-size: 14px;" accept-charset="ISO-8859-1">
                   			<input type="checkbox" name="statusNotifications" <%if(i.getStatusNotification()) out.print("checked='checked'");%>/> <%=lang.getNOTIFY_STATUSES_LABEL()%><br/>
                   			<input type="checkbox" name="messageNotifications" <%if(i.getMessageNotification()) out.print("checked='checked'");%>/> <%=lang.getNOTIFY_MESSAGES_LABEL()%><br/>
                   			<input type="hidden" value="<%=i.getBusinessUserName() %>" name="userNameBiz"/>
                   			<input type="hidden" value="<%=i.getOrderNum() %>" name="orderNum"/>              
                   			
                   			<input type="submit" value="<%=lang.getSAVE_BUTTON()%>"/>
                   			 
                   		</form>
                   		
                   		<%if(biz.isSkypeLogin()!=null && !biz.isSkypeLogin().equals("")){%>
                   			<a href="skype:<%=biz.isSkypeLogin() %>?call"><img src="http://mystatus.skype.com/smallclassic/<%=biz.isSkypeLogin() %>" style="border: none;" width="114" height="20" alt="My status" /></a>
                   		<%} %>
                     </div>
                     
                     <div id="statusDiv" class="content">
                     	<ul>
                     	<%
                     	
                     	List<String> statuses = i.getStatusNamesList();
                     	int index=statuses.size();
                     	String currentStatus = Controller.getInstance().getCurrentStatusOfOrder(i);
                     	for (int j=0;j<index;j++){
                     		if (statuses.get(j).equals(currentStatus)){
                     		%>
	                     		<li value="<%=j%>" id="statusChange" class="statusChange currentStatus">
	                         	<%=statuses.get(j)%>
                         		</li>
                         	<%}else{ %>
	                         	<li value="<%=j%>" id="statusChange" class="statusChange">
	                     		<%=statuses.get(j)%>
	                     		</li>
                     		<%
                         	}
                     	}
                     		%>
                     		
                     		
                     	</ul>
                     </div>
                     <div id="messageDiv" class="content">                    	
                     	<%Text message =  i.getMessages();
                     		if(message!=null)
                     			out.println(message.getValue());
                     		else
                     			out.println("No Messages");%>
                     </div>
		</div>
	</li>
	<%
		}
	%>
	</ul>
	</div>
	
	<div class="column left">
	<ul class="sortable-list">
	<%
		for (Order i : list2) {
	%>
	
		<li class="sortable-item">
			<div class = "wraper">
				<img src="exit3.png"  class="exit"/>
				<p class="heading">
				<%Business biz = Controller.getInstance().getBiz(i.getBusinessUserName());%>
				<a href="/businessPage.jsp?bizKey=<%=biz.getKey().getId()%>" target="#">
				<% if (i.getBusinessUserName()!=null && biz.getLogoPic()!=null) {%>
					<img src="/showImage?imageKey=<%=i.getBusinessUserName()%>" width="50" />
				<%} else { %>
					<%=allBiz.userNameToBizName(i.getBusinessUserName())%>
				<%} %>
				</a>
				</p>
				<p class="heading"><%=lang.getORDER_LABEL()%> <%=i.getOrderNum()%></p>
				<input type="hidden" value="<%=i.getBusinessUserName()%>" id = "bizUser"/>
				<input type="hidden" value="<%=i.getOrderNum()%>" id = "orderId"/>
				<label class="heading2"> <%=lang.getSTATUS_LABEL()%>  <%=(Controller.getInstance().getCurrentStatusOfOrder(i)) %></label>
				<img src="arrowright3.png"  class="arrow"/><br>
                     <%if(i.getMessageToRead()){ %>
						<img src="unread3.png" class="message" />
					<%}else{ %>
	                     <img src="message4.png" class="message" />
	                <%} %>
                     <img src="cogWheel4.png" class="cogWheel" />	
                     <img src="trash4.png" class="trash"/>		
                     <div id="settingDiv" class="content">
                     <%
                     	
	    				int vote = i.getVote();
                     	for(int j=1;j<6;j++){
                     		if(j==1){
                     			if(vote==1){
                     				%><input class="star required" type="radio" name="vote2" value="1" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star required" type="radio" name="vote2" value="1"/><%
                     			}
                     		}
                     		else{
                     			if(vote==j){
                     				%><input class="star" type="radio" name="vote2" value="<%=j %>" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star" type="radio" name="vote2" value="<%=j %>"/><%
                     			}
                     		}                   		
                     	}%><br/><br/>
                   		<form action="orderSettingClient" method="post" style="font-size: 14px;" accept-charset="ISO-8859-1">
                   			<input type="checkbox" name="statusNotifications" <%if(i.getStatusNotification()) out.print("checked='checked'");%>/> <%=lang.getNOTIFY_STATUSES_LABEL()%><br/>
                   			<input type="checkbox" name="messageNotifications" <%if(i.getMessageNotification()) out.print("checked='checked'");%>/><%=lang.getNOTIFY_MESSAGES_LABEL()%><br/>
                   			<input type="hidden" value="<%=i.getBusinessUserName() %>" name="userNameBiz"/>
                   			<input type="hidden" value="<%=i.getOrderNum() %>" name="orderNum"/>                                 			
                   			<input type="submit" value="<%=lang.getSAVE_BUTTON()%>"/>
                   			 
                   		</form>
                   		<%if(biz.isSkypeLogin()!=null && !biz.isSkypeLogin().equals("")){%>
                   			<a href="skype:<%=biz.isSkypeLogin() %>?call"><img src="http://mystatus.skype.com/smallclassic/<%=biz.isSkypeLogin() %>" style="border: none;" width="114" height="20" alt="My status" /></a>
                   		<%} %>
                     </div>
                     
                     <div id="statusDiv" class="content">
                     	<ul>
                     	<%
                     	
                     	List<String> statuses = i.getStatusNamesList();
                     	int index=statuses.size();
                     	String currentStatus = Controller.getInstance().getCurrentStatusOfOrder(i);
                     	for (int j=0;j<index;j++){
                     		if (statuses.get(j).equals(currentStatus)){
                     		%>
	                     		<li value="<%=j%>" id="statusChange" class="statusChange currentStatus">
	                         	<%=statuses.get(j)%>
                         		</li>
                         	<%}else{ %>
	                         	<li value="<%=j%>" id="statusChange" class="statusChange">
	                     		<%=statuses.get(j)%>
	                     		</li>
                     		<%
                         	}
                     	}
                     	%>
                     	</ul>
                     </div>
                     <div id="messageDiv" class="content">
                     	<%Text message =  i.getMessages();
                     		if(message!=null)
                     			out.println(message.getValue());
                     		else
                     			out.println("No Messages");%>
                     </div>
		</div>
	</li>
	<%
		}
	%>
	</ul>
	</div>
	
	<div class="column left">
	<ul class="sortable-list">
	<%
		for (Order i : list3) {
	%>
	
		<li class="sortable-item">
			<div class = "wraper">
				<img src="exit3.png"  class="exit"/>
				<p class="heading">
				<%Business biz = Controller.getInstance().getBiz(i.getBusinessUserName());%>
				<a href="/businessPage.jsp?bizKey=<%=biz.getKey().getId()%>" target="#">
				<% if (i.getBusinessUserName()!=null && biz.getLogoPic()!=null) {%>
					<img src="/showImage?imageKey=<%=i.getBusinessUserName() %>" width="50" />
				<%} else { %>
					<%=allBiz.userNameToBizName(i.getBusinessUserName())%>
				<%} %>
				</a>
				</p>
				<p class="heading"><%=lang.getORDER_LABEL()%> <%=i.getOrderNum()%></p>
				<input type="hidden" value="<%=i.getOrderNum()%>" id = "orderId"/>
				<input type="hidden" value="<%=i.getBusinessUserName()%>" id = "bizUser"/>
				<label class="heading2"> <%=lang.getSTATUS_LABEL()%> <%=(Controller.getInstance().getCurrentStatusOfOrder(i)) %></label>
				<img src="arrowright3.png"  class="arrow"/><br>
                     <%if(i.getMessageToRead()){ %>
						<img src="unread3.png" class="message" />
					<%}else{ %>
	                     <img src="message4.png" class="message" />
	                <%} %>
                     <img src="cogWheel4.png" class="cogWheel" />
                     <img src="trash4.png" class="trash"/>		
                     <div id="settingDiv" class="content">
                     <%
                     	
	    				int vote = i.getVote();
                     	for(int j=1;j<6;j++){
                     		if(j==1){
                     			if(vote==1){
                     				%><input class="star required" type="radio" name="vote3" value="1" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star required" type="radio" name="vote3" value="1"/><%
                     			}
                     		}
                     		else{
                     			if(vote==j){
                     				%><input class="star" type="radio" name="vote3" value="<%=j %>" checked="checked"/><%
                     			}
                     			else{
                     				%><input class="star" type="radio" name="vote3" value="<%=j %>"/><%
                     			}
                     		}                   		
                     	}%>
					<br/><br/>
                   		<form action="orderSettingClient" method="post" style="font-size: 14px;" accept-charset="ISO-8859-1">
                   			<input type="checkbox" name="statusNotifications" <%if(i.getStatusNotification()) out.print("checked='checked'");%>/> <%=lang.getNOTIFY_STATUSES_LABEL()%><br/>
                   			<input type="checkbox" name="messageNotifications" <%if(i.getMessageNotification()) out.print("checked='checked'");%>/> <%=lang.getNOTIFY_MESSAGES_LABEL()%><br/>
                   			<input type="hidden" value="<%=i.getBusinessUserName() %>" name="userNameBiz"/>
                   			<input type="hidden" value="<%=i.getOrderNum() %>" name="orderNum"/>              
                   			<input type="submit" value="<%=lang.getSAVE_BUTTON()%>"/>
                   			 
                   		</form>
                   		<%if(biz.isSkypeLogin()!=null && !biz.isSkypeLogin().equals("")){%>
                   			<a href="skype:<%=biz.isSkypeLogin() %>?call"><img src="http://mystatus.skype.com/smallclassic/<%=biz.isSkypeLogin() %>" style="border: none;" width="114" height="20" alt="My status" /></a>
                   		<%} %>
                     </div>
                     
                     <div id="statusDiv" class="content">
                     	<ul>
                     	   	<%
                     	
                     	List<String> statuses = i.getStatusNamesList();
                     	int index=statuses.size();
                     	String currentStatus = Controller.getInstance().getCurrentStatusOfOrder(i);
                     	for (int j=0;j<index;j++){
                     		if (statuses.get(j).equals(currentStatus)){
                     		%>
	                     		<li value="<%=j%>" id="statusChange" class="statusChange currentStatus">
	                         	<%=statuses.get(j)%>
                         		</li>
                         	<%}else{ %>
	                         	<li value="<%=j%>" id="statusChange" class="statusChange">
	                     		<%=statuses.get(j)%>
	                     		</li>
                     		<%
                         	}
                     	}
                     		%>
                     	</ul>
                     </div>
                     <div id="messageDiv" class="content">
                     	<%Text message =  i.getMessages();
                     		if(message!=null)
                     			out.println(message.getValue());
                     		else
                     			out.println("No Messages");%>
                     </div>
		</div>
	</li>
	<%
		}
	%>
	</ul>
	</div>
	
</div>
        

		<div class="clearer">&nbsp;</div>
	</div>	


		<div id="footer">
	<a href="allClientOrders.jsp?lang=he"><img src="images/hebrew.gif" width="30px" style="float: left; margin-top: 0.5%; margin-left: 0.5%;"/></a>
	<a href="allClientOrders.jsp?lang=en"><img src="images/english.gif" width="30px" style="float: left; margin-top: 0.5%;margin-left: 0.5%;"/></a>
	<center>
    <p><%=lang.getCOPY_RIGHT_LABEL() %></p>
    				<a href="home.jsp"><%=lang.getHOME_BUTTON() %></a> &nbsp;&nbsp;| &nbsp;&nbsp;
				<a href="home.jsp#customers"><%=lang.getCONTACT_BUTTON()%></a> &nbsp;&nbsp;|&nbsp;&nbsp;
				<a href="home.jsp?#about"><%=lang.getABOUT_BUTTON() %></a>
    </center>
	</div>
</div>


	</body>

</html>
